﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace Model
{
    [Serializable]
    public partial class Sys1a11
    {
		private string _listid;
		private string _pagename;
		private string _pagetext;
		private string _itemvalue;
		private string _itemvalue1;
		private string _itemvalue2;
		private string _autoload;
		private string _itemvalue3;
		private string _itemvalue4;
		private string _itemvalue5;
		
        /// <summary>
        /// 主键标识
        /// </summary>
		public string Listid
		{
			get { return _listid;	 }
			set { _listid=value;	}
		}
        /// <summary>
        /// 页面标识
        /// </summary>
		public string Pagename
		{
			get { return _pagename;	 }
			set { _pagename=value;	}
		}
        /// <summary>
        /// 项名称
        /// </summary>
		public string Pagetext
		{
			get { return _pagetext;	 }
			set { _pagetext=value;	}
		}
        /// <summary>
        /// 项值
        /// </summary>
		public string Itemvalue
		{
			get { return _itemvalue;	 }
			set { _itemvalue=value;	}
		}
        /// <summary>
        /// 值1
        /// </summary>
		public string Itemvalue1
		{
			get { return _itemvalue1;	 }
			set { _itemvalue1=value;	}
		}
        /// <summary>
        /// 值2
        /// </summary>
		public string Itemvalue2
		{
			get { return _itemvalue2;	 }
			set { _itemvalue2=value;	}
		}
        /// <summary>
        /// 
        /// </summary>
		public string Autoload
		{
			get { return _autoload;	 }
			set { _autoload=value;	}
		}
        /// <summary>
        /// 
        /// </summary>
		public string Itemvalue3
		{
			get { return _itemvalue3;	 }
			set { _itemvalue3=value;	}
		}
        /// <summary>
        /// 
        /// </summary>
		public string Itemvalue4
		{
			get { return _itemvalue4;	 }
			set { _itemvalue4=value;	}
		}
        /// <summary>
        /// 
        /// </summary>
		public string Itemvalue5
		{
			get { return _itemvalue5;	 }
			set { _itemvalue5=value;	}
		}
		
		public static List<Sys1a11> GetSys1a11ListByDataTable(DataTable dt)
		{
			if(dt == null) return null;
		    List<Sys1a11> list = new List<Sys1a11>();
		   
			foreach(DataRow dr in dt.Rows)
            {
				Sys1a11 model = GetSys1a11ByDataRow(dr);
				if(null == model) continue;
				
				list.Add(model);
            }
           return list;
		}
		
		public static Sys1a11 GetSys1a11ByDataRow(DataRow dr)
		{
			Sys1a11 model = new Sys1a11(); //实例化Sys1a11
	
			DataColumnCollection dcc = dr.Table.Columns;

			if (dcc.Contains("listid")&&!(dr["listid"] is System.DBNull))  
				model.Listid = ( string)dr["listid"];
			if (dcc.Contains("pagename")&&!(dr["pagename"] is System.DBNull))  
				model.Pagename = ( string)dr["pagename"];
			if (dcc.Contains("pagetext")&&!(dr["pagetext"] is System.DBNull))  
				model.Pagetext = ( string)dr["pagetext"];
			if (dcc.Contains("itemvalue")&&!(dr["itemvalue"] is System.DBNull))  
				model.Itemvalue = ( string)dr["itemvalue"];
			if (dcc.Contains("itemvalue1")&&!(dr["itemvalue1"] is System.DBNull))  
				model.Itemvalue1 = ( string)dr["itemvalue1"];
			if (dcc.Contains("itemvalue2")&&!(dr["itemvalue2"] is System.DBNull))  
				model.Itemvalue2 = ( string)dr["itemvalue2"];
			if (dcc.Contains("autoload")&&!(dr["autoload"] is System.DBNull))  
				model.Autoload = ( string)dr["autoload"];
			if (dcc.Contains("itemvalue3")&&!(dr["itemvalue3"] is System.DBNull))  
				model.Itemvalue3 = ( string)dr["itemvalue3"];
			if (dcc.Contains("itemvalue4")&&!(dr["itemvalue4"] is System.DBNull))  
				model.Itemvalue4 = ( string)dr["itemvalue4"];
			if (dcc.Contains("itemvalue5")&&!(dr["itemvalue5"] is System.DBNull))  
				model.Itemvalue5 = ( string)dr["itemvalue5"];
			
			return model;
		}
    }
}
